package com.easy.project.base.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 分页查询基础的dto
 * @author wxz
 */
@Data
@ApiModel("BaseQueryPageDTO")
public class BaseQueryPageDTO implements Serializable {

    /**
     * 当前页
     */
    @NotNull(message = "当前页不能为空")
    @Min(value = 1,message = "当前页最小值不能小于1")
    @ApiModelProperty(value = "当前页",required = true)
    private Integer current;

    /**
     * 条数
     */
    @NotNull(message = "当前条数不能为空")
    @Min(value = 1,message = "最小条数不能小于1")
    @ApiModelProperty(value = "每页条数",required = true)
    private Integer size;
}
